import {StnDataTableColumns, StnTableEditorDelBtnGroup} from "st-ui-vue3-navie"
import {h} from 'vue'

// 表格列配置
export const columnsOrigin: StnDataTableColumns = [
  {
    title: 'No',
    key: 'no',
    draggable: true,
  },
  {
    title: 'Title',
    key: 'title',
    draggable: true,
  },
  {
    title: 'Length',
    key: 'length',
    draggable: true,
  },
  {
    title: 'ID',
    key: 'id',
    draggable: false,
    disableChecked: true,
  },
  {
    title: '菜单类型',
    key: 'type',
  },
  {
    title: '菜单名称',
    key: 'name',
  },
  {
    title: '父级菜单 ID',
    key: 'parentId',
  },
  {
    title: '路由名称',
    key: 'routeName',
  },
  {
    title: '路由路径',
    key: 'routePath',
  },
  {
    title: '路由参数',
    key: 'routeQuery',
    checked: false,
  },
  {
    title: '链接路径',
    key: 'linkPath',
    checked: false,
  },
  {
    title: '图标',
    key: 'icon',
  },
  {
    title: '图标类型',
    key: 'iconType',
    checked: false,
  },
  {
    title: '排序',
    key:'sort',
  },
  {
    title: '是否禁用',
    key: 'disabled',
  },
  {
    title: '是否隐藏',
    key: 'hidden',
  },
  {
    title: '是否缓存',
    key: 'cached',
  },
  {
    title: '是否开启标签页',
    key: 'labeled',
  },
  {
    title: '在标签页中的排序',
    key: 'labelSort',
  },
  {
    title: 'Action',
    key: 'actions',
    draggable: true,
    width: 150,
    fixed: 'right',
    render: () => {
      return h(
        StnTableEditorDelBtnGroup,
        {},
        {
          'editor-dialog': () => {}
        }
      )
    }
  }
]

// 表格数据
export const dataOrigin = [
  {no: 3, title: 'Wonderwall', length: '4:18'},
  {
    no: 4,
    title: 'Don\'t Look Back in Anger',
    length: '4:48',
    children: [{no: 13, title: 'Champagne Supernova', length: '7:27'}]
  },
  {no: 12, title: 'Champagne Supernova', length: '7:27'}
]
